﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Moop.UI.Common.ViewModels;
using Moop.Common.IFaces;
using System.Collections.ObjectModel;
using System.Windows.Input;
using Moop.UI.Common.Commands;

namespace Moop.UI.Controls.ViewModels
{
    public class AddServerViewModel : BaseViewModel
    {
        #region Properties

        public ICommand SetServerCommand { get; set; }

        private ObservableCollection<IOlapServer> m_Servers;
        public ObservableCollection<IOlapServer> Servers
        {
            get { return m_Servers; }
            set
            {
                m_Servers = value;
                base.OnPropertyChanged("Servers");
            }
        }

        private bool CanAddServer(object param)
        {
            if (IsBusy)            
                return false;            
            else            
                return true;            
        }

        #endregion


        public AddServerViewModel()
        {
            SetServerCommand = new RelayCommand(AddNewServer, CanAddServer);
        }

        private void AddNewServer(object obj)
        {
            //WORKING YAY!!!
        }
    }
}
